<template>
  <div class="little-page">
    <div class="central">
      <div class="title">
        <h1>点点滴滴</h1>
        <p>记录我们在一起的每一个美好瞬间</p>
      </div>
      
      <div class="row central central-800">
        <div class="card col-lg-12 col-md-12 col-sm-12 col-sm-x-12">
          <div class="little-content animated fadeInUp">
            <div class="timeline">
              <div 
                v-for="memory in memories" 
                :key="memory.id" 
                class="timeline-item"
              >
                <div class="timeline-marker"></div>
                <div class="timeline-content">
                  <div class="memory-date">
                    {{ memory.date }}
                  </div>
                  <div class="memory-title">
                    {{ memory.title }}
                  </div>
                  <div class="memory-description">
                    {{ memory.description }}
                  </div>
                  <div 
                    v-if="memory.image" 
                    class="memory-image"
                  >
                    <img 
                      :src="memory.image" 
                      :alt="memory.title"
                      class="spotlight"
                    >
                  </div>
                </div>
              </div>
            </div>
            
            <div v-if="memories.length === 0" class="no-memories">
              暂无回忆记录，快来添加你们的美好回忆吧！
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'LittleView',
  data() {
    return {
      memories: [
        {
          id: 1,
          date: "2024-06-01",
          title: "第一次约会",
          description: "今天我们第一次正式约会，一起去看了电影，吃了好吃的餐厅。",
          image: "https://img.gejiba.com/images/b0d44ed67e25235f552aacbe32d81b5c.jpg"
        },
        {
          id: 2,
          date: "2024-05-20",
          title: "520表白日",
          description: "今天是520表白日，我为你准备了惊喜礼物，你很开心。",
          image: ""
        },
        {
          id: 3,
          date: "2024-05-01",
          title: "第一次旅行",
          description: "我们一起去海边旅行，看到了美丽的日出，留下了美好的回忆。",
          image: "https://img.gejiba.com/images/f4b1de284e9dcb9057553642d9fee764.png"
        },
        {
          id: 4,
          date: "2024-04-15",
          title: "相识纪念日",
          description: "今天是我们相识一周年的纪念日，时间过得真快。",
          image: "https://img.gejiba.com/images/7c5f1a655788c0d6ff0cae50232dde65.jpg"
        }
      ]
    }
  }
}
</script>

<style scoped>
.little-page {
  padding: 2rem 0;
}

.title {
  text-align: center;
  margin-bottom: 2rem;
}

.title h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.title p {
  color: #666;
}

.little-content {
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #007bff;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #007bff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #007bff;
}

.timeline-content {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 1.5rem;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #f8f9fa;
}

.memory-date {
  color: #007bff;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.memory-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #333;
}

.memory-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.memory-image {
  text-align: center;
}

.memory-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.no-memories {
  text-align: center;
  color: #999;
  padding: 2rem 0;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-marker {
    left: -1.9rem;
  }
  
  .title h1 {
    font-size: 1.5rem;
  }
  
  .memory-title {
    font-size: 1.1rem;
  }
}
</style>
